﻿<?php
	
	/*
	 * 测试用代码，完成单元测试用途
	 */
	echo "\r\n=============================================================================\r\n";
	include_once('class.mysql.php');
	$TestDb = new db('127.0.0.1','ticket','ticket','closering');
	$TestDb->open('127.0.0.1','ticket','ticket','closering');
	if ($TestDb->ping())
		echo "connect() and ping() success";
	$TestDb->query('select * from cr_staff ');
	echo $TestDb->numRows($TestDb->result);
	echo  "\r\n";
	while ($rows = $TestDb->fetchArray($TestDb->result,MYSQL_ASSOC))
		foreach ($rows as $k => $v)
			echo  $k . " => " . $v . "\r\n";	

?>